package com.gsnd.gsnd21study.utils;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 定义一些状态码和状态信息
 */
@AllArgsConstructor
@Getter
public enum ResultCode {
    SUCCESS(1,"请求成功"),
    /* 数据错误 */
    DATA_EXISTED(1001,"数据已存在"),
    DATA_NOT_EXIST(1002,"数据不存在"),
    DATA_WRONG(1003,"数据错误"),
    /* 业务逻辑错误 */
    SERVICE_ERROR(2001,"业务层错误"),

    /* 服务器内部错误 */
    SYSTEM_INNER_ERROR(3001,"服务器内部错误");

    private final Integer code;
    private final String msg;
}
